"""
author: liuxu
date: 2025/6/21
description:测试hipsample自带测例
"""
import os
import allure
import pytest
import re

from common.logger_ctrl import mylogger
from common.ssh_command import exec_cmd
from base_public.testbase import BasePublic


@pytest.mark.skip
@allure.feature('hip sample用例')
@pytest.mark.low
class TestHipSamples(BasePublic):
    def test_hip_sample(self, test_env):
        """
        测试hip sample全量用例
        :param test_env:
        :return:
        """
        shell_jq_path = os.path.join(self.proj_path, "shell_script/hip-samples_test.sh")
        ret, output = exec_cmd(f"bash {shell_jq_path}", timeout=300)
        # assert ret is True  # 忽略程序的stderr输出
        assert "All test cases passed" in output.rsplit("=====")[-1]